1. Field of the Invention
The present invention generally relates to an interface circuit for data communications in which a communication port for USB (universal serial bus) communications is used in common with UART (universal asynchronous receiver transmitter) communications, and in particular, which has a power source switching circuit for switching power source voltages between a USB power source voltage and a core circuit power source voltage.
2. Description of the Related Art
Conventionally, there is a device in which a communication port for USB communications is used in common with UART communications. For example, Patent Document 1 discloses a communications adaptor. In the communications adaptor, by detecting a power source voltage for USB (VBUS), when the voltage is not detected, a switch is switched from a USB circuit to a UART circuit, and when the voltage is detected, the switch is again switched from the UART circuit to the USB circuit. In Patent Document 2, a communication interface for an electronic device is disclosed. In the electronic device, the switch is controlled by a microprocessor.
FIG. 3 is a diagram showing a conventional interface circuit. In FIG. 3, in an interface circuit 100, during USB communications, a power source voltage VBUS (not shown) is supplied and a USB stabilized power source voltage VUSB is generated. During UART communications, a battery power source voltage VBAT (not shown) is supplied and a core circuit power source voltage DVDD is generated from the battery power source voltage VBAT.
However, during the UART communications, the power source voltage VBUS is not supplied, and only the battery power source voltage VBAT and the core circuit power source voltage DVDD exist. Consequently, a reverse current must be studied from terminals D+/RXD and D−/TXD connected to a communication cable 107 to an HS (high speed) driver circuit 105 for high speed operations and an FS (full speed) driver circuit 106 for full speed operations in a USB interface circuit 102. In FIG. 3, the USB interface circuit 102 is directly connected to a UART interface circuit 103, the terminals D+/RXD and D−/TXD are directly connected to a switching circuit 111 of the HS driver circuit 105, and the terminals D+/RXD and D−/TXD are connected to a switching circuit 121 of the FS driver circuit 106 via resistors 128 and 129. Resistance values of the resistors 128 and 129 are, for example, 33Ω, respectively.
In FIG. 3, the description of elements except for the elements described above is omitted.
FIG. 4 is a diagram showing the switching circuit 111. As shown in FIG. 4, a switch SW103 provides a PMOS transistor 151 and an NMOS transistor 152 connected in parallel, and similarly, a switch SW104 provides a PMOS transistor 153 and an NMOS transistor 154 connected in parallel. The switching circuit 121 has a structure similar to that of the switching circuit 111.
FIG. 5 is a cut-away side view of the PMOS transistor 151 (153). In FIG. 5, when the USB stabilized power source voltage VUSB is not supplied, a current flows into the USB stabilized power source voltage VUSB via a forward route of a parasitic diode. In this case, a current over a designed value is consumed, and in some cases, signals during the UART communications cannot be normally transmitted and the UART communications cannot be executed due to a voltage drop due to the current flow.
Generally, the switching circuits 111 and 121 must be controlled by a power source voltage which is always applied to the circuits. However, when the communication circuit of the interface circuit does not have a host function, the USB power source voltage is supplied to the circuit via a cable. Since the cable is not always connected to the interface circuit 100, the switching circuits 111 and 121 cannot be controlled by using the power source voltage via the cable. Consequently, in a case of a mobile terminal, the mobile terminal uses a battery installed inside as the power source; however, the power source voltage largely fluctuates. When the power source voltage largely fluctuates, the fluctuation of the on-resistance value of the transistors in the switching circuits 111 and 121 becomes large. In order to control the fluctuation of the power source voltage within the USB standard, the sizes of the transistors must be large.
[Patent Document 1] Japanese Laid-Open Patent Application No. 2006-101291
[Patent Document 2] Japanese translations of PCT International No. 2004-534995 (WO2002/088973)
However, when the sizes of the transistors in the switching circuits 111 and 121 are large, the parasitic capacitance in the transistor becomes large; consequently, communication quality cannot be maintained, an area where the transistors are mounted becomes large, and the cost is increased.